package com.lefevre.cms.bean.thumbnail;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;

/**
 * 缩略图
 *
 * @author Lefevre
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("thumbnail")
@Entity
@Table(name = "thumbnail", uniqueConstraints = {
        @UniqueConstraint(columnNames = {"specificationGroup"})})
public class Thumbnail implements Serializable {
    private static final long serialVersionUID = 2981137798741140950L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @TableId(type = IdType.INPUT)
    private Integer id;

    /**
     * 缩略图名称
     **/
    @Column(length = 200)
    private String name;

    /**
     * 宽
     **/
    private Integer width;

    /**
     * 高
     **/
    private Integer high;

    /**
     * 规格组
     **/
    @Column(length = 25)
    private String specificationGroup;

}
